tar xf ${DOWNLOADDIR}/Python-3.13.7.tar.xz -C ${BUILDDIR}
pushd ${BUILDDIR}/Python-3.13.7
	./configure --prefix=${SYSDIR}/cross-tools --with-platlibdir=lib64 \
	            --disable-shared --with-system-expat --with-system-ffi \
	            --with-ensurepip=yes --enable-optimizations \
	            ac_cv_broken_sem_getvalue=yes
	make ${JOBS}
	make install
	sed -i "s@-lutil @@g" ${SYSDIR}/cross-tools/bin/python3.13-config
	cp ${SYSDIR}/cross-tools/lib64/python3.13/_sysconfigdata__linux_{x86_64-linux-gnu,${CROSS_TARGET}}.py
	sed -i -e "/'CC'/s@'gcc@'${CROSS_TARGET}-gcc@g" \
	       -e "/'CXX'/s@'g++@'${CROSS_TARGET}-g++@g" \
	       -e "/'LDSHARED'/s@'gcc@'${CROSS_TARGET}-gcc@g" \
	       -e "/'SOABI'/s@-x86_64-linux-gnu@-loongarch64-linux-gnu@g" \
	       -e "/'EXT_SUFFIX'/s@-x86_64-linux-gnu@-loongarch64-linux-gnu@g" \
	       ${SYSDIR}/cross-tools/lib64/python3.13/_sysconfigdata__linux_${CROSS_TARGET}.py
popd
